import {BasePage, BaseInput, BaseRule} from "../../../../../ts/type";
import {replace} from "../../../../../ts/util";

export let entityLabelValueUpdateInit = (page: BasePage) => {
    let updateModel = page.models.filter(m => 'update' == m.formKey)[0]
    updateModel.formInputs.push(replace(new BaseInput('id', 'id'), {
        hidden: true
    }))
// field input auto
// #bind.field.tableCode#
    updateModel.formInputs.push(replace(new BaseInput('实体编码', 'tableCode'), {
        inputType: 'select',
        options: [],
        optionsUrl: '/au/entity/tableCode/select'
    }))
// $bind.field.tableCode$

// #bind.field.labelFieldCode#
    updateModel.formInputs.push(replace(new BaseInput('Label属性名称', 'labelFieldCode'), {
        inputType: 'select',
        options: [],
        optionsUrl: '/au/entityColumn/fieldCode/select'
    }))
// $bind.field.labelFieldCode$

// #bind.field.valueFieldCode#
    updateModel.formInputs.push(replace(new BaseInput('Value属性名称', 'valueFieldCode'), {
        inputType: 'select',
        options: [],
        optionsUrl: '/au/entityColumn/fieldCode/select'
    }))
// $bind.field.valueFieldCode$

// #bind.field.dataApiType#
    updateModel.formInputs.push(replace(new BaseInput('适用数据结构', 'dataApiType'), {
        span: 12
    }))
// $bind.field.dataApiType$


// field rule auto

}